package com.gitee.zhengjiasen.dp.state.demo2;


/**
 * 不能抽奖状态
 */
public class NoRaffleState extends State {

    private Activity activity;

    // 传入一个Context对象
    public NoRaffleState(Activity activity) {
        this.activity = activity;
    }

    @Override
    void deduceMoney() {
        System.out.println("扣除积分成功, 可以开始抽奖");
    }

    @Override
    boolean raffle() {
        System.out.println("请先扣除积分, 再进行抽奖");
        return false;
    }

    @Override
    void dispensePrize() {
        System.out.println("还未抽奖, 不能发放奖品");
    }
}
